package com.alibaba.algo.dao.user;

import com.alibaba.algo.cooperation.feign.vo.req.GetGroupBaseInfoReqVO;
import com.alibaba.algo.cooperation.feign.vo.res.GroupBaseInfoResponseVO;
import com.alibaba.algo.core.base.BaseMapper;
import com.alibaba.algo.entity.user.SysGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类SysGroupMapper.java的实现描述：用户组Mapper
 *
 * @author fan.tianpeng 2021-05-06 19:26:33
 */
public interface SysGroupMapper extends BaseMapper<SysGroup> {

    List<SysGroup> getListByIds(@Param("ids") List<Long> ids);

    Integer countByParaWithEmployeeCondition(@Param("obj") SysGroup sysgroup);

    List<SysGroup> pageByParaWithEmployeeCondition(@Param("obj") SysGroup sysgroup, @Param("start") int start, @Param("end") int end, @Param("sort") String sort);

    int updateDeleteFlagByGroupIds(@Param("obj") SysGroup sysGroup, @Param("ids") List<Long> ids);

    /**
     * 通过人员组Id或Code查询人员组基本信息
     *
     * @param paramVO
     * @return
     */
    GroupBaseInfoResponseVO getGroupBaseInfoByIdOrCode(@Param("param") GetGroupBaseInfoReqVO paramVO);

    List<SysGroup> getListCodeOrName(@Param("groupCode") String groupCode, @Param("groupName") String groupName);

    SysGroup getByCode(@Param("groupCode") String groupCode);
}
